<head>
    <meta charset="UTF-8">
<title>算法训练 会议中心</title>
<link rel="stylesheet" href="../css/main.css">
</head>
 <h1 style="text-align: center; margin: 17pt 0cm 16.5pt" align="center"><span style="font-family: 黑体">会议中心<span lang="EN-US"><o:p></o:p></span></span></h1>
<p style="text-indent: 24pt; margin: 0cm 0cm 0pt; mso-char-indent-count: 2.0" class="MsoNormal"><span style="font-size: 12pt" lang="EN-US"><font face="Times New Roman">Siruseri</font></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">政府建造了一座新的会议中心。许多公司对租借会议中心的会堂很感兴趣，他们希望能够在里面举行会议。</span><span style="font-size: 12pt" lang="EN-US"><o:p></o:p></span></p>
<p style="text-indent: 24pt; margin: 0cm 0cm 0pt; mso-char-indent-count: 2.0" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">对于一个客户而言，仅当在开会时能够独自占用整个会堂，他才会租借会堂。会议中心的销售主管认为：最好的策略应该是将会堂租借给尽可能多的客户。显然，有可能存在不止一种满足要求的策略。</span><span style="font-size: 12pt" lang="EN-US"><o:p></o:p></span></p>
<p style="text-indent: 24pt; margin: 0cm 0cm 0pt; mso-char-indent-count: 2.0" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">例如下面的例子。总共有</span><span style="font-size: 12pt" lang="EN-US"><font face="Times New Roman">4</font></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">个公司。他们对租借会堂发出了请求，并提出了他们所需占用会堂的起止日期（如下表所示）。</span><span style="font-size: 12pt" lang="EN-US"><o:p></o:p></span></p>
<p style="text-indent: 24pt; margin: 0cm 0cm 0pt; mso-char-indent-count: 2.0" class="MsoNormal"><span style="font-size: 12pt" lang="EN-US"><o:p><font face="Times New Roman">&nbsp;</font></o:p></span></p>
<div align="center">
<table style="margin: auto auto auto 83.4pt; border-collapse: collapse; mso-yfti-tbllook: 1184; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-border-insideh: .5pt solid black; mso-border-insidev: .5pt solid black" class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0">
    <tbody>
        <tr style="mso-yfti-irow: 0; mso-yfti-firstrow: yes">
            <td style="border-bottom: black 1pt solid; border-left: #ece9d8; padding-bottom: 0cm; background-color: transparent; padding-left: 5.4pt; width: 66.15pt; padding-right: 5.4pt; border-top: #ece9d8; border-right: black 1pt solid; padding-top: 0cm; mso-border-bottom-alt: solid black .5pt; mso-border-right-alt: solid black .5pt" valign="top" width="88">
            <p style="text-align: center; margin: 0cm 0cm 0pt" class="MsoNormal" align="center"><span style="font-size: 12pt" lang="EN-US"><o:p><font face="Times New Roman">&nbsp;</font></o:p></span></p>
            </td>
            <td style="border-bottom: black 1pt solid; border-left: #ece9d8; padding-bottom: 0cm; background-color: transparent; padding-left: 5.4pt; width: 66.15pt; padding-right: 5.4pt; border-top: #ece9d8; border-right: black 1pt solid; padding-top: 0cm; mso-border-bottom-alt: solid black .5pt; mso-border-right-alt: solid black .5pt; mso-border-left-alt: solid black .5pt" valign="top" width="88">
            <p style="text-align: center; margin: 0cm 0cm 0pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">开始日期</span><span style="font-size: 12pt" lang="EN-US"><o:p></o:p></span></p>
            </td>
            <td style="border-bottom: black 1pt solid; border-left: #ece9d8; padding-bottom: 0cm; background-color: transparent; padding-left: 5.4pt; width: 66.15pt; padding-right: 5.4pt; border-top: #ece9d8; border-right: #ece9d8; padding-top: 0cm; mso-border-bottom-alt: solid black .5pt; mso-border-left-alt: solid black .5pt" valign="top" width="88">
            <p style="text-align: center; margin: 0cm 0cm 0pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">结束日期</span><span style="font-size: 12pt" lang="EN-US"><o:p></o:p></span></p>
            </td>
        </tr>
        <tr style="mso-yfti-irow: 1">
            <td style="border-bottom: black 1pt solid; border-left: #ece9d8; padding-bottom: 0cm; background-color: transparent; padding-left: 5.4pt; width: 66.15pt; padding-right: 5.4pt; border-top: #ece9d8; border-right: black 1pt solid; padding-top: 0cm; mso-border-bottom-alt: solid black .5pt; mso-border-right-alt: solid black .5pt; mso-border-top-alt: solid black .5pt" valign="top" width="88">
            <p style="text-align: center; margin: 0cm 0cm 0pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">公司</span><span style="font-size: 12pt" lang="EN-US"><font face="Times New Roman">1<o:p></o:p></font></span></p>
            </td>
            <td style="border-bottom: black 1pt solid; border-left: #ece9d8; padding-bottom: 0cm; background-color: transparent; padding-left: 5.4pt; width: 66.15pt; padding-right: 5.4pt; border-top: #ece9d8; border-right: black 1pt solid; padding-top: 0cm; mso-border-left-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; mso-border-alt: solid black .5pt" valign="top" width="88">
            <p style="text-align: center; margin: 0cm 0cm 0pt" class="MsoNormal" align="center"><span style="font-size: 12pt" lang="EN-US"><font face="Times New Roman">4<o:p></o:p></font></span></p>
            </td>
            <td style="border-bottom: black 1pt solid; border-left: #ece9d8; padding-bottom: 0cm; background-color: transparent; padding-left: 5.4pt; width: 66.15pt; padding-right: 5.4pt; border-top: #ece9d8; border-right: #ece9d8; padding-top: 0cm; mso-border-bottom-alt: solid black .5pt; mso-border-left-alt: solid black .5pt; mso-border-top-alt: solid black .5pt" valign="top" width="88">
            <p style="text-align: center; margin: 0cm 0cm 0pt" class="MsoNormal" align="center"><span style="font-size: 12pt" lang="EN-US"><font face="Times New Roman">9<o:p></o:p></font></span></p>
            </td>
        </tr>
        <tr style="mso-yfti-irow: 2">
            <td style="border-bottom: black 1pt solid; border-left: #ece9d8; padding-bottom: 0cm; background-color: transparent; padding-left: 5.4pt; width: 66.15pt; padding-right: 5.4pt; border-top: #ece9d8; border-right: black 1pt solid; padding-top: 0cm; mso-border-bottom-alt: solid black .5pt; mso-border-right-alt: solid black .5pt; mso-border-top-alt: solid black .5pt" valign="top" width="88">
            <p style="text-align: center; margin: 0cm 0cm 0pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">公司</span><span style="font-size: 12pt" lang="EN-US"><font face="Times New Roman">2<o:p></o:p></font></span></p>
            </td>
            <td style="border-bottom: black 1pt solid; border-left: #ece9d8; padding-bottom: 0cm; background-color: transparent; padding-left: 5.4pt; width: 66.15pt; padding-right: 5.4pt; border-top: #ece9d8; border-right: black 1pt solid; padding-top: 0cm; mso-border-left-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; mso-border-alt: solid black .5pt" valign="top" width="88">
            <p style="text-align: center; margin: 0cm 0cm 0pt" class="MsoNormal" align="center"><span style="font-size: 12pt" lang="EN-US"><font face="Times New Roman">9<o:p></o:p></font></span></p>
            </td>
            <td style="border-bottom: black 1pt solid; border-left: #ece9d8; padding-bottom: 0cm; background-color: transparent; padding-left: 5.4pt; width: 66.15pt; padding-right: 5.4pt; border-top: #ece9d8; border-right: #ece9d8; padding-top: 0cm; mso-border-bottom-alt: solid black .5pt; mso-border-left-alt: solid black .5pt; mso-border-top-alt: solid black .5pt" valign="top" width="88">
            <p style="text-align: center; margin: 0cm 0cm 0pt" class="MsoNormal" align="center"><span style="font-size: 12pt" lang="EN-US"><font face="Times New Roman">11<o:p></o:p></font></span></p>
            </td>
        </tr>
        <tr style="mso-yfti-irow: 3">
            <td style="border-bottom: black 1pt solid; border-left: #ece9d8; padding-bottom: 0cm; background-color: transparent; padding-left: 5.4pt; width: 66.15pt; padding-right: 5.4pt; border-top: #ece9d8; border-right: black 1pt solid; padding-top: 0cm; mso-border-bottom-alt: solid black .5pt; mso-border-right-alt: solid black .5pt; mso-border-top-alt: solid black .5pt" valign="top" width="88">
            <p style="text-align: center; margin: 0cm 0cm 0pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">公司</span><span style="font-size: 12pt" lang="EN-US"><font face="Times New Roman">3<o:p></o:p></font></span></p>
            </td>
            <td style="border-bottom: black 1pt solid; border-left: #ece9d8; padding-bottom: 0cm; background-color: transparent; padding-left: 5.4pt; width: 66.15pt; padding-right: 5.4pt; border-top: #ece9d8; border-right: black 1pt solid; padding-top: 0cm; mso-border-left-alt: solid black .5pt; mso-border-top-alt: solid black .5pt; mso-border-alt: solid black .5pt" valign="top" width="88">
            <p style="text-align: center; margin: 0cm 0cm 0pt" class="MsoNormal" align="center"><span style="font-size: 12pt" lang="EN-US"><font face="Times New Roman">13<o:p></o:p></font></span></p>
            </td>
            <td style="border-bottom: black 1pt solid; border-left: #ece9d8; padding-bottom: 0cm; background-color: transparent; padding-left: 5.4pt; width: 66.15pt; padding-right: 5.4pt; border-top: #ece9d8; border-right: #ece9d8; padding-top: 0cm; mso-border-bottom-alt: solid black .5pt; mso-border-left-alt: solid black .5pt; mso-border-top-alt: solid black .5pt" valign="top" width="88">
            <p style="text-align: center; margin: 0cm 0cm 0pt" class="MsoNormal" align="center"><span style="font-size: 12pt" lang="EN-US"><font face="Times New Roman">19<o:p></o:p></font></span></p>
            </td>
        </tr>
        <tr style="mso-yfti-irow: 4; mso-yfti-lastrow: yes">
            <td style="border-bottom: #ece9d8; border-left: #ece9d8; padding-bottom: 0cm; background-color: transparent; padding-left: 5.4pt; width: 66.15pt; padding-right: 5.4pt; border-top: #ece9d8; border-right: black 1pt solid; padding-top: 0cm; mso-border-right-alt: solid black .5pt; mso-border-top-alt: solid black .5pt" valign="top" width="88">
            <p style="text-align: center; margin: 0cm 0cm 0pt" class="MsoNormal" align="center"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">公司</span><span style="font-size: 12pt" lang="EN-US"><font face="Times New Roman">4<o:p></o:p></font></span></p>
            </td>
            <td style="border-bottom: #ece9d8; border-left: #ece9d8; padding-bottom: 0cm; background-color: transparent; padding-left: 5.4pt; width: 66.15pt; padding-right: 5.4pt; border-top: #ece9d8; border-right: black 1pt solid; padding-top: 0cm; mso-border-right-alt: solid black .5pt; mso-border-left-alt: solid black .5pt; mso-border-top-alt: solid black .5pt" valign="top" width="88">
            <p style="text-align: center; margin: 0cm 0cm 0pt" class="MsoNormal" align="center"><span style="font-size: 12pt" lang="EN-US"><font face="Times New Roman">10<o:p></o:p></font></span></p>
            </td>
            <td style="border-bottom: #ece9d8; border-left: #ece9d8; padding-bottom: 0cm; background-color: transparent; padding-left: 5.4pt; width: 66.15pt; padding-right: 5.4pt; border-top: #ece9d8; border-right: #ece9d8; padding-top: 0cm; mso-border-left-alt: solid black .5pt; mso-border-top-alt: solid black .5pt" valign="top" width="88">
            <p style="text-align: center; margin: 0cm 0cm 0pt" class="MsoNormal" align="center"><span style="font-size: 12pt" lang="EN-US"><font face="Times New Roman">17<o:p></o:p></font></span></p>
            </td>
        </tr>
    </tbody>
</table>
</div>
<p style="text-indent: 24pt; margin: 0cm 0cm 0pt; mso-char-indent-count: 2.0" class="MsoNormal"><span style="font-size: 12pt" lang="EN-US"><o:p><font face="Times New Roman">&nbsp;</font></o:p></span></p>
<p style="text-indent: 24pt; margin: 0cm 0cm 0pt; mso-char-indent-count: 2.0" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">上例中，最多将会堂租借给两家公司。租借策略分别是租给公司</span><span style="font-size: 12pt" lang="EN-US"><font face="Times New Roman">1</font></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和公司</span><span style="font-size: 12pt" lang="EN-US"><font face="Times New Roman">3</font></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，或是公司</span><span style="font-size: 12pt" lang="EN-US"><font face="Times New Roman">2</font></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和公司</span><span style="font-size: 12pt" lang="EN-US"><font face="Times New Roman">3</font></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，也可以是公司</span><span style="font-size: 12pt" lang="EN-US"><font face="Times New Roman">1</font></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和公司</span><span style="font-size: 12pt" lang="EN-US"><font face="Times New Roman">4</font></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。注意会议中心一天最多租借给一个公司，所以公司</span><span style="font-size: 12pt" lang="EN-US"><font face="Times New Roman">1</font></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和公司</span><span style="font-size: 12pt" lang="EN-US"><font face="Times New Roman">2</font></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">不能同时租借会议中心，因为他们在第九天重合了。</span><span style="font-size: 12pt" lang="EN-US"><o:p></o:p></span></p>
<p style="text-indent: 24pt; margin: 0cm 0cm 0pt; mso-char-indent-count: 2.0" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">销售主管为了公平起见，决定按照如下的程序来确定选择何种租借策略：首先，将租借给客户数量最多的策略作为候选，将所有的公司按照他们发出请求的顺序编号。对于候选策略，将策略中的每家公司的编号按升序排列。最后，选出其中字典序最小</span><a style="mso-footnote-id: ftn1" title="" href="http://oj.tsinsen.com/fckeditor/editor/fckeditor.html?InstanceName=content&amp;Toolbar=Jelly#_ftn1" name="_ftnref1"><span class="MsoFootnoteReference"><span style="font-size: 12pt" lang="EN-US"><span style="mso-special-character: footnote"><span class="MsoFootnoteReference"><span style="font-family: &quot;Times New Roman&quot;,&quot;serif&quot;; font-size: 12pt; mso-fareast-font-family: 宋体; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA" lang="EN-US">[1]</span></span></span></span></span></a><span style="font-family: 宋体; font-size: 12pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的候选策略作为最终的策略。</span><span style="font-size: 12pt" lang="EN-US"><o:p></o:p></span></p>
<p style="text-indent: 24pt; margin: 0cm 0cm 0pt; mso-char-indent-count: 2.0" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">例中，会堂最终将被租借给公司</span><span style="font-size: 12pt" lang="EN-US"><font face="Times New Roman">1</font></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和公司</span><span style="font-size: 12pt" lang="EN-US"><font face="Times New Roman">3</font></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">：</span><span style="font-size: 12pt" lang="EN-US"><font face="Times New Roman">3</font></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">个候选策略是</span><span style="font-size: 12pt" lang="EN-US"><font face="Times New Roman">{(1,3),(2,3),(1,4)}</font></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。而在字典序中</span><span style="font-size: 12pt" lang="EN-US"><font face="Times New Roman">(1,3)&lt;(1,4)&lt;(2,3)</font></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。</span><span style="font-size: 12pt" lang="EN-US"><o:p></o:p></span></p>
<p style="text-indent: 24pt; margin: 0cm 0cm 0pt; mso-char-indent-count: 2.0" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">你的任务是帮助销售主管确定应该将会堂租借给哪些公司。</span><b style="mso-bidi-font-weight: normal"><span style="font-size: 12pt" lang="EN-US"><o:p></o:p></span></b></p>
<h3 style="margin: 13pt 0cm"><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"><font size="5">输入格式</font></span></h3>
<p style="line-height: 17pt; text-indent: 24pt; margin: 6pt 0cm 0pt; mso-char-indent-count: 2.0; mso-para-margin-top: .5gd; mso-line-height-rule: exactly" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">输入的第一行有一个整数</span><i style="mso-bidi-font-style: normal"><span style="font-size: 12pt" lang="EN-US"><font face="Times New Roman">N</font></span></i><span style="font-family: 宋体; font-size: 12pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，表示发出租借会堂申请的公司的个数。第</span><span style="font-size: 12pt" lang="EN-US"><font face="Times New Roman">2</font></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">到第</span><font face="Times New Roman"><i style="mso-bidi-font-style: normal"><span style="font-size: 12pt" lang="EN-US">N</span></i><span style="font-size: 12pt" lang="EN-US">+1</span></font><span style="font-family: 宋体; font-size: 12pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">行每行有</span><span style="font-size: 12pt" lang="EN-US"><font face="Times New Roman">2</font></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">个整数。第</span><font face="Times New Roman"><i style="mso-bidi-font-style: normal"><span style="font-size: 12pt" lang="EN-US">i</span></i><span style="font-size: 12pt" lang="EN-US">+1</span></font><span style="font-family: 宋体; font-size: 12pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">行的整数表示第</span><i style="mso-bidi-font-style: normal"><span style="font-size: 12pt" lang="EN-US"><font face="Times New Roman">i</font></span></i><span style="font-family: 宋体; font-size: 12pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">家公司申请租借的起始和终止日期。对于每个公司的申请，起始日期为不小于</span><span style="font-size: 12pt" lang="EN-US"><font face="Times New Roman">1</font></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的整数，终止日期为不大于</span><span style="font-size: 12pt" lang="EN-US"><font face="Times New Roman">10<sup>9</sup></font></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的整数。</span><span style="font-size: 12pt" lang="EN-US"><o:p></o:p></span></p>
<h3 style="margin: 13pt 0cm"><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"><font size="5">输出格式</font></span></h3>
<p style="line-height: 17pt; text-indent: 24pt; margin: 6pt 0cm 0pt; mso-char-indent-count: 2.0; mso-para-margin-top: .5gd; mso-line-height-rule: exactly" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">输出的第一行应有一个整数</span><i style="mso-bidi-font-style: normal"><span style="font-size: 12pt" lang="EN-US"><font face="Times New Roman">M</font></span></i><span style="font-family: 宋体; font-size: 12pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，表示最多可以租借给多少家公司。第二行应列出</span><i style="mso-bidi-font-style: normal"><span style="font-size: 12pt" lang="EN-US"><font face="Times New Roman">M</font></span></i><span style="font-family: 宋体; font-size: 12pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">个数，表示最终将会堂租借给哪些公司。</span><span style="font-size: 12pt" lang="EN-US"><o:p></o:p></span></p>
<h3 style="margin: 13pt 0cm"><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"><font size="5">数据范围</font></span></h3>
<p style="line-height: 17pt; text-indent: 24pt; margin: 6pt 0cm 0pt; mso-char-indent-count: 2.0; mso-para-margin-top: .5gd; mso-line-height-rule: exactly" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">对于</span><span style="font-size: 12pt" lang="EN-US"><font face="Times New Roman">50%</font></span><span style="font-family: 宋体; font-size: 12pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的输入，</span><font face="Times New Roman"><i style="mso-bidi-font-style: normal"><span style="font-size: 12pt" lang="EN-US">N</span></i><span style="font-size: 12pt" lang="EN-US">&le;3000</span></font><span style="font-family: 宋体; font-size: 12pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。在所有输入中，</span><font face="Times New Roman"><i style="mso-bidi-font-style: normal"><span style="font-size: 12pt" lang="EN-US">N</span></i><span style="font-size: 12pt" lang="EN-US">&le;200000</span></font><span style="font-family: 宋体; font-size: 12pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。</span><span style="font-size: 12pt" lang="EN-US"><o:p></o:p></span></p>
<h3 style="margin: 13pt 0cm"><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"><font size="5">输入样例</font></span></h3>
<p style="margin: 0cm 0cm 0pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt" lang="EN-US">4<o:p></o:p></span></p>
<p style="margin: 0cm 0cm 0pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt" lang="EN-US">4 9<o:p></o:p></span></p>
<p style="margin: 0cm 0cm 0pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt" lang="EN-US">9 11<o:p></o:p></span></p>
<p style="margin: 0cm 0cm 0pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt" lang="EN-US">13 19<o:p></o:p></span></p>
<p style="margin: 0cm 0cm 0pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt" lang="EN-US">10 17<o:p></o:p></span></p>
<h3 style="margin: 13pt 0cm"><span style="font-family: 宋体; mso-ascii-font-family: Calibri; mso-hansi-font-family: Calibri"><font size="5">输出样例</font></span></h3>
<p style="margin: 0cm 0cm 0pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt" lang="EN-US">2<o:p></o:p></span></p>
<p style="margin: 0cm 0cm 0pt" class="MsoNormal"><span style="font-family: 宋体; font-size: 12pt" lang="EN-US">1 3<o:p></o:p></span></p>
<div style="mso-element: footnote-list"><br clear="all" />
<hr align="left" size="1" width="33%" />
<div style="mso-element: footnote" id="ftn1">
<p style="margin: 0cm 0cm 0pt" class="MsoFootnoteText"><a style="mso-footnote-id: ftn1" title="" href="http://oj.tsinsen.com/fckeditor/editor/fckeditor.html?InstanceName=content&amp;Toolbar=Jelly#_ftnref1" name="_ftn1"><span class="MsoFootnoteReference"><span lang="EN-US"><span style="mso-special-character: footnote"><span class="MsoFootnoteReference"><span style="font-family: &quot;Times New Roman&quot;,&quot;serif&quot;; font-size: 9pt; mso-fareast-font-family: 宋体; mso-font-kerning: 1.0pt; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA" lang="EN-US">[1]</span></span></span></span></span></a><span lang="EN-US"><font face="Times New Roman"> </font></span><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">字典序指在字典中排列的顺序，如果序列</span><font face="Times New Roman"><i style="mso-bidi-font-style: normal"><span lang="EN-US">l</span></i><sub><span lang="EN-US">1</span></sub></font><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">是序列</span><font face="Times New Roman"><i style="mso-bidi-font-style: normal"><span lang="EN-US">l</span></i><sub><span lang="EN-US">2</span></sub></font><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的前缀，或者对于</span><font face="Times New Roman"><i style="mso-bidi-font-style: normal"><span lang="EN-US">l</span></i><sub><span lang="EN-US">1</span></sub></font><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">和</span><font face="Times New Roman"><i style="mso-bidi-font-style: normal"><span lang="EN-US">l</span></i><sub><span lang="EN-US">2</span></sub></font><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的第一个不同位置</span><i style="mso-bidi-font-style: normal"><span lang="EN-US"><font face="Times New Roman">j</font></span></i><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，</span><font face="Times New Roman"><i style="mso-bidi-font-style: normal"><span lang="EN-US">l</span></i><sub><span lang="EN-US">1</span></sub><span lang="EN-US">[<i style="mso-bidi-font-style: normal">j</i>]&lt;<i style="mso-bidi-font-style: normal">l</i><sub>2</sub>[<i style="mso-bidi-font-style: normal">j</i>]</span></font><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，则</span><font face="Times New Roman"><i style="mso-bidi-font-style: normal"><span lang="EN-US">l</span></i><sub><span lang="EN-US">1</span></sub></font><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">比</span><font face="Times New Roman"><i style="mso-bidi-font-style: normal"><span lang="EN-US">l</span></i><sub><span lang="EN-US">2</span></sub></font><span style="font-family: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">小。</span></p>
</div>
</div>